function cc=mapmesh(c,T,d,degree)
if (max(d)>degree)>0
        error('level error');
end
posT=size(T,1);
L=1;
Ad=eye((d+1)*(d+2)/2);
[dofs0,n_dof] = sort_dof_dis(size(T,1),d);
for dmin=d:degree-1
    Ad=asce_mat(dmin+1,asce_pattern(dmin))*Ad;
end
[dofs,n_dof] = sort_dof_dis(size(T,1),degree);
for tri=1:posT
   index1=dofs0(tri,:);
   index2=dofs(tri,:);
   cc(index2)=Ad*c(index1);
    
end